<template>
    <el-dialog
        :title="title"
        :visible="dialogFlag"
        width="65%"
        center
        @close="clonseDialog"
        :close-on-click-modal="false"
        :destroy-on-close="true"
        :lock-scroll="false"
    >
        <span slot="title">{{ title }}</span>
        <!-- 工单基本信息 -->
        <div class="content">
            <p class="title">工单基本信息</p>
            <div class="base_info">
                <div>工单编号：{{ formObj.pmsConstructionOrder.orderNo }}</div>
                <div>工单名称：{{ formObj.pmsConstructionOrder.propertyName }}</div>
                <div>工程面积：{{ formObj.pmsConstructionOrder.renovationTotalArea }}</div>
            </div>
            <div class="base_info">
                <div>
                    工程地址：
                    {{ formObj.pmsConstructionOrder.orderProjectAddress }}
                </div>
                <div>甲方联系人：{{ formObj.pmsConstructionOrder.followUpEmp }}</div>
                <div>甲方联系电话：{{ formObj.pmsConstructionOrder.followUpPhone }}</div>
            </div>
        </div>
        <!-- 进场材料 -->
        <div class="inside-wrapper">
            <p class="title">材料</p>
            <!-- 遍历循环 -->
            <div v-for="(item, index) in formObj.recordList" :key="index">
                <p class="second-title">造价材料名称：{{ item.costMaterials }}</p>
                <p class="second-title" v-if="taskName == 1">主材品牌：{{ item.materialsBrand }}</p>
                <p class="second-title" v-if="taskName == 2">是否隐蔽项：是</p>
                <div class="pic-upload">
                    <Upload
                        :uploadImage.sync="item.uploadImage"
                        :disabledUpload="!(formObj.taskStatus == 1 || formObj.taskStatus == 3)"
                    ></Upload>
                </div>
                <p class="second-title cover-color">最少1张，可上传多张</p>
            </div>
        </div>
        <!-- 附件上传 -->
        <div class="origin-layout">
            <p class="title">附件上传</p>
            <div>
                <div class="pic-upload">
                    <UploadFiles :uploadFile.sync="formObj" :limitSize="1"></UploadFiles>
                </div>
                <p>《{{ title }}表》供应商盖章扫描件（必填）</p>
            </div>
        </div>
        <span slot="footer" class="dialog-footer">
            <el-button @click="clonseDialog">取 消</el-button>
            <!--     -->
            <template v-if="formObj.canOperating">
                <el-button type="primary" @click="saveDialog">保存</el-button>
                <el-button type="primary" @click="submitDialog">提交</el-button>
            </template>
        </span>
    </el-dialog>
</template>

<script>
import BaseDialog from './BaseDialog.js';
export default {
    ...BaseDialog
};
</script>

<style scoped lang="less">
@import './BaseDialog.less';
</style>
